package com.bookocean.infrastructure.persistence.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.Data;

import java.time.LocalDateTime;


/**
 * 书籍PO类
 * 
 * @author BookOcean
 * @since 2024-01-01
 */
@Data
@TableName("book_po")
public class BookPO {

    /**
     * 书籍ID
     */
    @TableId(value = "book_id", type = IdType.AUTO)
    private Long bookId;

    /**
     * 书籍标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 书籍作者
     */
    @TableField(value = "author")
    private String author;

    /**
     * 书籍封面URL
     */
    @TableField(value = "cover_url")
    private String coverUrl;

    /**
     * 书籍分类
     */
    @TableField(value = "category")
    private String category;

    /**
     * 记录用户首次添加的
     */
    @TableField(value = "created_user_id")
    private Long createdUserId;

    /**
     * 书籍创建时间
     */
    @TableField(value = "created_at")
    private LocalDateTime createdAt;
}
